home *** CD-ROM | disk | FTP | other *** search
/ MacAdvocate 2 / apple-mac-advocate-ii-fall-1997.iso / mac / MacOS / Other Installers / LaserWriter 8.4.1 Installer / LaserWriter Disk 1 / PL.CommonRsrc / PL.CommonRsrc.rsrc / TEXT_1000.txt < prev    next >
Encoding:
Text File  |  1996-09-10  |  4.4 KB  |  234 lines

  1.  %Misc defs
  2.  /AppleLW
  3.   statusdict begin product end                 
  4.   (LaserWriter) search
  5.     { pop pop pop true }
  6.     { false exch                                    % Check for LW Pro 400/405, project names, etc‚Ķ
  7.       [
  8.         (PC-PR3000PS/4) 
  9.         (PC-PR3000PS/4F) 
  10.                          ] 
  11.       { 1 index eq 3 -1 roll or exch } forall pop
  12.         { true } 
  13.         { false } ifelse } ifelse
  14. def
  15.  
  16. /isLevel2
  17. systemdict /languagelevel 2 copy known
  18. { get 2 ge } { pop pop {languagelevel} stopped { false } { 2 ge } ifelse } ifelse
  19. def
  20.  
  21.  statusdict begin
  22.  % Get the product name (must change it for LW400 & 405s)
  23. /product load dup dup (PC-PR3000PS/4) eq 
  24. {pop pop (LaserWriter Pro 400) } 
  25. {(PC-PR3000PS/4F) eq {pop (LaserWriter Pro 405) } if }
  26. ifelse == 
  27. end
  28.  
  29.  
  30. %Get the ROM version
  31. statusdict begin
  32. revision AppleLW {cvr} if =string cvs {mark (%NetworkInterface%) currentdevparams } stopped not 
  33. { exch pop /ROMVersion get dup length  2 index  length dup /ver exch def add 11 add string dup 0 
  34.  (PS: ) putinterval dup ver 5 -1 roll putinterval dup 4 ver add (  I/O: ) putinterval 
  35.  dup 11 ver add 4 -1 roll putinterval} {cleartomark} ifelse 
  36. dup length 1 string dup 0 4 -1 roll put print print
  37. end
  38.  
  39. %print new line char
  40. (\n) print
  41.  
  42.  
  43. %Get the PS version
  44. systemdict begin
  45. version =string cvs dup length 1 string dup 0 4 -1 roll put print print
  46. end
  47.  
  48. %print new line char
  49. (\n) print
  50.  
  51.  
  52. % Get the PS revision
  53. %                                             fix me vvvvv
  54. statusdict /revision 2 copy known
  55. { get exec}
  56. { pop pop
  57.   { revision } stopped { -1 } if
  58. } ifelse =
  59.  
  60.  
  61. % Get the PS level
  62. systemdict/languagelevel 2 copy known{get}{pop pop 1}ifelse ==
  63.  
  64.  
  65. % Get the PS serial number
  66. /serialnumber where{pop
  67. serialnumber dup 0 lt  { 1  bitshift -1 bitshift } if
  68. =string cvs dup length 1 string dup 0 4 -1 roll put print print
  69. }{( )dup 0 0 put print}ifelse
  70.  
  71. %print new line char
  72. (\n) print
  73.  
  74.  
  75. %Get pages printed
  76. statusdict begin 
  77. pagecount =string cvs dup length 1 string dup 0 4 -1 roll put print print 
  78. end
  79.  
  80. %print new line char
  81. (\n) print
  82.  
  83.  
  84. %Get total memory in bytes
  85. isLevel2
  86. {    currentsystemparams /RamSize get
  87. }
  88. {
  89.     statusdict /ramsize 2 copy known
  90.     { get dup type (operatortype) eq {cvx exec}if}
  91.     { pop pop 0 } ifelse
  92. } ifelse
  93. =
  94.  
  95.  
  96. %Get free memory in bytes
  97. vmstatus exch sub = pop 
  98. %??flush 
  99.  
  100.  
  101. % Get the resolution
  102.  
  103. %TH:
  104. { /ActualValues /ProcSet findresource } stopped not
  105. {    begin HWResolution end ==
  106. }
  107. {    pop pop
  108. %Other:
  109.     isLevel2
  110.     {    currentpagedevice /HWResolution 2 copy known 
  111.         { get == }
  112.         { pop pop ([300 300]) = } ifelse
  113.     }
  114.     {    statusdict /resolution 2 copy known
  115.         {    ([) print get =string cvs dup print ( ) print print (]) = }
  116.         { pop pop ([300 300]) = } ifelse
  117.     } ifelse
  118. } ifelse
  119.  
  120. %Get color
  121. systemdict /colorimage known
  122. {
  123.     statusdict begin
  124.     /processcolors where
  125.     {
  126.         pop processcolors 1 gt
  127.     }{
  128.         false %% Unknown
  129.     }ifelse
  130.     end
  131. }{
  132. false
  133. }ifelse
  134. dup {(hasColor)}{(noColor)}ifelse print (\n)print
  135.  
  136.  
  137. %Get fax
  138. %%?BeginFeatureQuery: *FaxSupport
  139. ()/resourcestatus where
  140. {pop
  141.     /HWOptions/Category resourcestatus
  142.     {    pop pop
  143.         /Fax/HWOptions resourcestatus
  144.         {    pop pop pop(hasFax\n)}    
  145.         {    (noFax\n)}    ifelse
  146.     }
  147.     {(noFax\n)}ifelse
  148. }
  149. {(noFax\n)}ifelse print
  150. %%?EndFeatureQuery: Unknown
  151.  
  152. %??flush
  153.  
  154.  
  155. %Get Binary Communications
  156. %Ask Steve for PS
  157.  
  158. %Get Optional Cassette
  159. %Dave will talk to Chuck at Adobe
  160. isLevel2
  161. {
  162.     currentpagedevice /InputAttributes get 2 2 copy known 
  163.     {get /null eq not
  164.     }
  165.     { pop pop false } ifelse
  166. }
  167. {    false
  168. } ifelse
  169. { (hasOpitionalCassette\r)}
  170. { (noOpitionalCassette\r)} ifelse print
  171.  
  172. %Get envelope feeder
  173.  
  174.  
  175. %Get Duplexing
  176. isLevel2
  177. {    currentpagedevice /Duplex known
  178. }
  179. {    false
  180. } ifelse
  181. {(hasDuplexing\n)}{(noDuplexing\n)} ifelse  print
  182.  
  183.  
  184. % Get optional cassette (array elem 2)
  185.  
  186. systemdict/languagelevel 2 copy known{get}{pop pop 1}ifelse
  187. 2 ge {
  188. currentpagedevice /InputAttributes get
  189. dup 2 known
  190. {2 get null ne {(hasOptionalCassette\n)}{(noOptionalCassette\n)}ifelse}
  191. {pop (noOptionalCassette\n)}ifelse
  192. }
  193. {(noOptionalCassette\n)}ifelse
  194. print 
  195.  
  196.  
  197. %Get envelope feeder (array elem 3)
  198. systemdict/languagelevel 2 copy known{get}{pop pop 1}ifelse
  199. 2 ge {
  200. currentpagedevice /InputAttributes get
  201. dup 3 known
  202. {3 get null ne {(hasEnvelopeFeeder\n)}{(noEnvelopeFeeder\n)}ifelse}
  203. {pop (noEnvelopeFeeder\n)}ifelse
  204. }
  205. {(noEnvelopeFeeder\n)}ifelse
  206. print 
  207.  
  208.  
  209. %%Get has Binary Communications
  210. (hasBinaryCommunications\n)
  211. /currentdevparams where
  212. {
  213. pop
  214. [
  215. {
  216. currentsystemparams/CurInputDevice get
  217. currentdevparams
  218. }stopped
  219. {
  220. cleartomark 0 dict
  221. }{
  222. exch pop
  223. }ifelse
  224. dup/Filtering known
  225. {
  226. /Filtering get
  227. /None ne
  228. {pop(noBinaryCommunications\n)}if
  229. }{
  230. pop
  231. }ifelse
  232. }if
  233. print
  234.